<% content_for :header do %>
<div id="nav">
  <ul>
    <li><a href="/intro">活动介绍</a></li>
    <li><a href="/join">如何参与</a></li>
    <li><a href="/news">最新动态</a></li>
    <li><a href="/contact">联系我们</a></li>
  </ul>
</div>
<div id="pagetitle">
  <h1>用 户 资 料</h1>
</div>
<% end %>

<div id="content">
  <div id="innercontent">
    <p style="line-height:2.2em"><%= image_tag (url_for_file_column('user', 'avatar_url', 'large'), :style => "float:left;margin:5px; border-right:1px solid #1053ef;padding-right:3px") if @user.avatar_url%>
    <em style="font-size:1.3em;"><%= h @user.login %></em><br /> <%= link_to image_tag("/images/delicious.png"), h(@user.delicious_url) if @user.delicious_url %> <%= link_to image_tag("/images/yupoo.png"), h(@user.yupoo_url) if @user.yupoo_url %> <%= link_to image_tag("/images/douban.png"), h(@user.douban_url) if @user.douban_url %> <%= link_to image_tag("/images/fanfou.png"), h(@user.fanfou_url) if @user.fanfou_url %> <%= link_to image_tag("/images/twitter.png"), h(@user.twitter_url) if @user.twitter_url %></p>
    <h2>我的留言</h2>
    <% for b in @broadcasts -%>
      <div>
        <% color = %w(orange purple red blue green) %>
        <span style="color:<%= color[rand(color.size)]%>">
          <% if b.from == 0 -%>
            <%= b.content %>
          <% else -%>
            <%= h b.content %>
          <% end -%>
        </span>
        <span class="sysmsg"><img src="/images/comment.png" /> <%= "by #{link_to b.sender.login, user_path(b.sender)}" unless b.from==0 %> <%= show_datetime b.created_at %></span>
      </div>
    <% end -%>
  </div>
</div>